require 'csv'
require 'redis'

@redis = Redis.new(:host => 'xx.xx.xx.xx', :port => '6379', :db => 3)
@file_name = "2014hubei"
@contact = "37846123"


def run
	CSV.open("gaokao_links/#{@file_name}.csv", mode = "rb", options = {:encoding=>"GBK:UTF-8"} ).each_with_index do |n,i|
		puts "-------------------------------#{i}"
		@redis.sadd("gk66_urls_#{@contact}",n.join(","))	
	end
end

run